<?php
/**
 * Default Layout
 *  
 * @author
 * @version
 */

/**
 * Get locale 
 */
$locale = Zend_Registry::get('Zend_Locale');

/**
 * Set templates encoding
 */
$this->setEncoding('utf-8');

echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo $this->doctype('XHTML1_STRICT');
?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $locale; ?>" dir="<?php echo 'ltr'; /* 'rtl' */?>">
<head>
	<?php
		echo $this->headTitle('L10nex');

		echo $this->headScript();
	    echo $this->headStyle();
	    echo $this->headLink()->appendStylesheet(APP_URL . '/css/screen.css');

	    // $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
		// $this->headMeta()->appendHttpEquiv('Content-Language', ($locale == 'en') ? (string) $locale : $locale . ',en' );
		// echo $this->headMeta();
		// <meta name="Language" content="english" />
	?>
	<meta http-equiv="Content-Language" content="<?php ($locale == 'en') ? (string) $locale : $locale . ',en' ?>" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	
	<meta name="description" content="<?php echo $this->_('L10n eXchange is a translation memory exchange service.') ?>" />
	<meta name="keywords" content="<?php echo $this->_('terms translation') ?>, <?php echo $this->_('translation sharing')?>, <?php echo $this->_('translation publishing') ?>, <?php echo $this->_('web 2.0')?>, <?php echo $this->_('translation search') ?>, <?php echo $this->_('translated documents')?>, <?php echo $this->_('translation memory')?>" />

</head>
<body>

<div id="wrapper">
	
	<!--  header -->
	
	<div id="header">
		<a href="<?php echo APP_URL ?>/" title="L10nex">
			<img id="logo" alt="L10nex" src="<?php echo APP_URL ?>/images/logo_color2.jpg" />
		</a>
		<form>
		<div id="top-panel">
	
			<?php 
			$target = $this->User->target_lang;
			$source = $this->User->source_lang;
	
			if ($this->isRoute('translation', 'pair')): ?>
			<div id="top-panel-unknown">
				<?php echo $this->_('You can set your language pair right now.')?><br />
				<?php echo $this->_('Just choose your source and target languages and click'); ?> "<?php echo $this->_('Save'); ?>".
			</div>
			<?php else: ?>
	
				<?php if (empty($target) && empty($source)): ?>
		
					<div id="top-panel-unknown" onclick="location.href='<?php echo APP_URL ?>/translation/pair'">
						<?php echo $this->_('You can get more relevant content especially for you.') ?><br />
						<?php echo $this->_('Just click this cute yellow box to set your language pair.'); ?>
					</div>
					
				<?php else: ?>
		
					<div id="top-panel-language-pairs" onclick="if (confirm('<?php echo $this->_('Are you sure to change your language pair?'); ?>')) {location.href='<?php echo APP_URL ?>/translation/pair'}">
					<?php echo $this->_('language pair') ?>
					<div id="selected-language-pair">
						<span><?php echo $this->User->source_lang_title ?></span> 
						&rArr;
						<span><?php echo $this->User->target_lang_title ?></span>
					</div>
					</div>
		
				<?php endif; ?>
	
			<?php endif; ?>
	
		</div>
		</form>
	
	   <?php /*	
		<div id="user-menu">
			  <a href="#"><?php echo $this->_('Login') ?></a>
			| <a href="#"><?php echo $this->_('Sign Up') ?></a>
	
	         | <a href="#"><?php echo $this->_('Help') ?></a> 
	
		</div>
		*/ ?>
	</div>
	
	<div id="top-menu-block">
		<div id="top-left-menu">
		
		<?php /* ?>
			<a href="/" <?php if ($this->isRoute('default', 'index', 'index')) echo 'class="active"' ?>>
				<?php echo $this->_('Home') ?></a>
		<?php */ ?>
		
			<a href="<?php echo APP_URL ?>/translation/search/" <?php if ($this->isRoute('translation', 'search')) echo 'class="active"' ?>>
				<?php echo $this->_('Search') ?></a>
			<?php
			/* 
			<a href="#" onclick="alert('comming soon...')"><?php echo $this->_('Browse') ?></a>
			
			<a href="#" onclick="alert('comming soon...')"><?php echo $this->_('Share') ?></a>
			*/
			?>
			
		</div>
		<div id="top-right-menu">
	
			<a href="<?php echo APP_URL ?>/user/profile/options" <?php if ($this->isRoute('user', 'profile') || $this->isRoute('translation', 'pair')) echo 'class="active"'  ?>>
				<?php echo $this->_('Options') ?></a>
	
			<a href="<?php echo APP_URL ?>/help" <?php if ($this->isRoute('default', 'help')) echo 'class="active"' ?>>
				<?php echo $this->_('Help')?></a>
	
		</div>
	</div>
	
	
	<!-- main content -->
	
	<div id="main-content">
		<?php echo $this->layout()->content ?>
	</div>
	
	
	<!-- footer -->
	
	<div id="footer-top-bar">
		&copy;&nbsp;&nbsp;2008-<?php echo date('Y'); ?>&nbsp;&nbsp;&nbsp;L10nex
	</div>
	
	<?php /* ?>
	
	<div id="footer-menu">
	
	
	
		<div class="col5">
			<h5 class="underline"><?php echo $this->_('About Us') ?></h5>
			<ul>
				<li><a href="#"><?php echo $this->_('What is L10nex') ?></a></li>
				<li><a href="#"><?php echo $this->_('Contact Us') ?></a></li>
				<li><a href="#"><?php echo $this->_('Press') ?></a></li>
				<li><a href="#"><?php echo $this->_('Blog') ?></a></li>
			</ul>
		</div>
		
		<div class="col5">
			<h5 class="underline"><?php echo $this->_('Community') ?></h5>
			<ul>
				<li><a href="#"><?php echo $this->_('Forum') ?></a></li>
				<li><a href="#"><?php echo $this->_('Authors') ?></a></li>
				<li><a href="#"><?php echo $this->_('Contributing') ?></a></li>
				<li><a href="#"><?php echo $this->_('Donations') ?></a></li>
				<li><a href="#"><?php echo $this->_('Gears Shop') ?></a></li>
			</ul>
		</div>
		
		<div class="col5">
			<h5 class="underline"><?php echo $this->_('Using L10nex' )?></h5>
			<ul>
				<li><a href="#"><?php echo $this->_('FAQ') ?></a></li>
				<li><a href="#"><?php echo $this->_('Searching') ?></a></li>
				<li><a href="#"><?php echo $this->_('Uploading TMs') ?></a></li>
				<li><a href="#"><?php echo $this->_('Downloading TMs') ?></a></li>
				<li><a href="#"><?php echo $this->_('Tools') ?></a></li>
			</ul>
		</div>
	
		<div class="col5">
			<h5 class="underline"><?php echo $this->_('Other Information') ?></h5>
			<ul>
	            <li><a href="#"><?php echo $this->_('Localization standards') ?></a></li>
	            <li><a href="#"><?php echo $this->_('What is localization?') ?></a></li>
				<li><a href="#"><?php echo $this->_('Library') ?></a></li>
				<li><a href="#"><?php echo $this->_('Links') ?></a></li>
				<li><a href="#"><?php echo $this->_('Interesting Facts') ?></a></li>
			</ul>
		</div>
		
		<div class="col5">
			<h5 class="underline"><?php echo $this->_('Legal') ?></h5>
			<ul>
				<li><a href="#"><?php echo $this->_('Terms') ?></a></li>
				<li><a href="#"><?php echo $this->_('Privacy Policy') ?></a></li>
				<li><a href="#"><?php echo $this->_('Copyright') ?></a></li>
				<li><a href="#"><?php echo $this->_('License') ?></a></li>
			</ul>
		</div>
	
	
	</div>
	
	<?php */ ?>
	
</div>

</body>
</html>